//////////////////////////////////////////////
// DepthStencilStateManager.h
//
//////////////////////////////////////////////

/// Defines / Macros -------------------------

#pragma once

/// Includes ---------------------------------

// nkGraphics
#include "../Dll/DllDefines.h"

#include "../Utils/Manager.h"

#include "DepthStencilState.h"

// nkCommon
#include <nilkinsCommon/Patterns/MaybeSingletonClass.h>

// nkMemory
#include <NilkinsMemory/Pointers/UniquePtr.h>

/// Class ------------------------------------

namespace nkGraphics
{
	class DLL_GRAPHICS_EXPORT DepthStencilStateManager : public Manager<DepthStencilState>, public nkCommon::MaybeSingletonClass<DepthStencilStateManager>
	{
		public :

			// Getters
			DepthStencilState* getDefaultState () const ;

		public :

			inline static const nkMemory::StringView DEFAULT_NO_DEPTH = "NILKINS_NO_DEPTH" ;
			inline static const nkMemory::StringView DEFAULT_BEHIND_EVERYTHING = "NILKINS_BEHIND_EVERYTHING" ;
			inline static const nkMemory::StringView DEFAULT_BEHIND_EVERYTHING_REVERSE_Z = "NILKINS_BEHIND_EVERYTHING_REVERSE_Z" ;

		private :

			// Constructors
			DepthStencilStateManager (bool isSingleton) noexcept ;
			DepthStencilStateManager (System* system) noexcept ;

			// Lifetime
			void _initializeDefaultState () ;

		private :
		
			// Attributes
			nkMemory::UniquePtr<DepthStencilState> _defaultState ;

		private :

			friend class nkCommon::MaybeSingletonClass<DepthStencilStateManager> ;
			friend class System ;
	} ;
}